<template>
  <div>
    <ul>
      <li v-for="item in info" :key="item.houseCode" @click="jump(item)">
        <van-card
          :price="item.price"
          :desc="item.desc"
          :title="item.title"
          thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
        >
          <template #tags>
            <van-tag plain type="danger">{{item.tags}}</van-tag>
          </template>
        </van-card>
      </li>
    </ul>
  </div>
</template>

<script>
import axios from "axios";
export default {
  name: "",
  props: {},
  data() {
    return {
      info: null,
    };
  },

  methods:{
    jump(item){
      this.$router.push({
        name:'jump',
        query:{
          item
        },
      })
    },
  },

  async created() {
    const { data } = await axios({
      url: "http://liufusong.top:8080/houses?cityId=AREA%7Cdbf46d32-7e76-1196&stat=1&end=10",
    });
    console.log(data);
    this.info = data.body.list;
  },
};
</script>

<style scoped lang="less"></style>
